// 分销管理
import request from "../utils/request";


// 分销设置详情  distribution/disConf/info
export const disSetDetail=async ()=>{
	return request.postRequest("distribution/disConf/info/1")
}


// 修改分销设置  distribution/disConf/update
export const updateDisSet=async (data)=>{
	return request.postRequest("distribution/disConf/update",data)
}

//分销等级列表
export const disLevellist=async(data)=>{
	return request.postRequest("distribution/disLevel/list",data)
}
//删除某分销等级
export const delatelevel=async(data)=>{
	return request.getRequest(`distribution/disLevel/delete/${data}`,data)
}
 
//查询某分销等级详情//调不到
export const detaillevel=async(data)=>{
	return request.getRequest(`distribution/disLevel/info/${data}`,data)
}

//添加新的分校等级
export const addLevel=async(data)=>{
	return request.postRequest("distribution/disLevel/insert",data)
}

//修改分校等级
export const updateLevel=async(data)=>{
	return request.postRequest("distribution/disLevel/update",data)
}

//分销商品列表
export const disgoodslist=async(data)=>{
	return request.postRequest("manager/goods/goodsList",data)
}
//分销商品详情
export const disgoodsDel=async(data)=>{
	return request.postRequest("manager/goods/goodsInfo",data)
}
//查看某商品都单独分校等级
export const DisgoodsDelLevel=async(data)=>{
	return request.postRequest(`distribution/disLevel/alone/info/${data}`)
}

//设置商品单独分销模式
export const Alonedisset=async(data)=>{
	return request.postRequest("distribution/disLevel/alone/insert",data)
}

//更改商品单独分销等级
export const updateAlonedisset=async(data)=>{
	return request.postRequest("distribution/disLevel/alone/update",data)
}

//多选商品参与分销
export const addgoodJoin=async(data)=>{
	return request.postRequest("distribution/distribution/goods/insert",data)
}

//多选商品取消分销
export const concelgoodJoin=async(data)=>{
	return request.postRequest("distribution/distribution/goods/delete",data)
}
//获取分销订单列表
export const getdisorderlist=async(data)=>{
	return request.postRequest("distribution/disOrder/search",data)
}
//协议设置
export const setagreement=async(data)=>{
	return request.postRequest("distribution/protocal/insert",data)
}
//协议设置详情
export const getagreement=async(data)=>{
	return request.postRequest("distribution/protocal/list",data)
}


